package com.sky.service.impl;

import com.sky.domain.Employee;
import com.sky.mapper.EmployeeMapper;
import com.sky.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 尹稳健~
 * @version 1.0
 */
@Service
public class EmployeeServiceImpl implements EmployeeService {

    @Autowired
    private EmployeeMapper employeeMapper;

    @Override
    public Employee login(String name, String password) {
        return employeeMapper.login(name,password);
    }

    @Override
    public List<Employee> findAll(String name) {
        return employeeMapper.findAll(name);
    }

    @Override
    public Employee findEmpById(Integer id) {
        return employeeMapper.findEmpById(id);
    }

    @Override
    public void update(Employee employee) {
        employeeMapper.update(employee);
    }

    @Override
    public void insert(Employee employee) {
        employeeMapper.insert(employee);
    }

    @Override
    public void delete(Integer id) {
        employeeMapper.delete(id);
    }
}
